package com.courseware.online.service;

import com.courseware.online.common.CommonUtil;
import com.courseware.online.dao.MenuDao;
import com.courseware.online.entity.Menu;
import com.courseware.online.vo.MenuVO;
import org.dozer.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author demos
 */
@Service
public class MenuServiceImpl implements MenuService{
    @Autowired
    private MenuDao menuDao;
    @Autowired
    protected Mapper dozerMapper;

    @Override
    public List<MenuVO> getAllMenu() {
        return CommonUtil.mapList(dozerMapper, menuDao.getAllMenu(), MenuVO.class);
    }
}
